package com.jiangnan.repository

import com.jiangnan.api.client.BookApiClient
import com.jiangnan.entity.BookRecommendationDTO
import com.jiangnan.entity.Res

class RecommendationRepository {

    suspend fun getRecommendations(userId: Int,topN: Int = 10) : List<BookRecommendationDTO>{
        return BookApiClient.recommendationApiService.getRecommendations(userId,topN)
    }

    suspend fun getRating(userId: Int, bookId: Int) : Res<Double>{
        return BookApiClient.recommendationApiService.getRating(userId,bookId)
    }

}